package ejb.cbm.commons;

import java.io.PrintWriter;
import java.io.StringWriter;

public class StackTrace2String {
	
	public static String stackTraceToString(Exception e) {
		try {
			StringWriter sw = new StringWriter();
			PrintWriter pw = new PrintWriter(sw);
			e.printStackTrace(pw);
			return sw.toString();
		} catch (Exception e2) {
			return "bad StackTrace2String";
		}
	}
}
